home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib9
/
v_11_01
/
1101118c
< prev
next >
Wrap
Text File
|
1995-11-01
|
302b
|
19 lines
/* touch.c: Update a file's time stamp */
#include <stdio.h>
void touch(char *fname)
{
FILE *f = fopen(fname,"r+b");
if (f != NULL)
{
char c = getc(f);
rewind(f);
putc(c,f);
}
else
fopen(fname,"wb");
fclose(f);
}